home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / TextEdit.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  25.8 KB  |  897 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        TextEdit.a
  3. ;
  4. ;    Contains:    TextEdit Interfaces.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  19. __TEXTEDIT__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  28.     include 'MixedMode.a'
  29.     ENDIF
  30.  
  31.  
  32.  
  33. ; typedef TERec *                        TEPtr
  34.  
  35. ; typedef TEPtr *                        TEHandle
  36.  
  37. ;  
  38. ;    Important note about TEClickLoopProcPtr and WordBreakProcPtr
  39. ;
  40. ;    At one point these were defined as returning the function result in the 
  41. ;    condition code Z-bit.  This was correct, in that it was what the 68K
  42. ;    implementation of TextEdit actually tested.  But, MixedMode had a different 
  43. ;    idea of what returning a boolean in the Z-bit meant.  MixedMode was setting
  44. ;    the Z-bit the complement of what was wanted.  
  45. ;    
  46. ;    Therefore, these ProcPtrs have been changed (back) to return the result in
  47. ;    register D0.  It turns out that for register based routines, 
  48. ;    MixedMode sets the Z-bit of the 68K emulator based on the contents 
  49. ;    of the return result register.  Thus we can get the Z-bit set correctly.  
  50. ;    
  51. ;    But, when TextEdit is recoded in PowerPC, if it calls a 68K ClickLoop
  52. ;    or WordBreak routine, register D0 had better have the result (in addition
  53. ;    to the Z-bit). Therefore all 68K apps should make sure their ClickLoop or
  54. ;    WordBreak routines set register D0 at the end.
  55. ;
  56.  
  57.  
  58. ;  
  59. ;    There is no function to get/set the low-mem for FindWordHook at 0x07F8.
  60. ;    This is because it is not a low-mem ProcPtr. That address is the entry
  61. ;    in the OS TrapTable for trap 0xA0FE.  You can use Get/SetTrapAddress to 
  62. ;    acccess it.    
  63. ;
  64.  
  65.  
  66. ;    The following ProcPtrs cannot be written in or called from a high-level 
  67. ;    language without the help of mixed mode or assembly glue because they 
  68. ;    use the following parameter-passing conventions:
  69. ;
  70. ;    typedef pascal void (*HighHookProcPtr)(const Rect *r, TEPtr pTE);
  71. ;    typedef pascal void (*CaretHookProcPtr)(const Rect *r, TEPtr pTE);
  72. ;
  73. ;        In:
  74. ;            =>     r                        on stack
  75. ;            =>    pTE                        A3.L
  76. ;        Out:
  77. ;            none
  78. ;
  79. ;    typedef pascal Boolean (*EOLHookProcPtr)(char theChar, TEPtr pTE, TEHandle hTE);
  80. ;
  81. ;        In:
  82. ;            =>     theChar                    D0.B
  83. ;            =>    pTE                        A3.L
  84. ;            =>    hTE                        A4.L
  85. ;        Out:
  86. ;            <=    Boolean                    Z bit of the CCR
  87. ;
  88. ;    typedef pascal unsigned short (*WidthHookProcPtr)(unsigned short textLen,
  89. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  90. ;    typedef pascal unsigned short (*TextWidthHookProcPtr)(unsigned short textLen,
  91. ;     unsigned short textOffset, void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  92. ;
  93. ;        In:
  94. ;            =>     textLen                    D0.W
  95. ;            =>    textOffset                D1.W
  96. ;            =>    textBufferPtr            A0.L
  97. ;            =>    pTE                        A3.L
  98. ;            =>    hTE                        A4.L
  99. ;        Out:
  100. ;            <=    unsigned short            D1.W
  101. ;
  102. ;    typedef pascal unsigned short (*NWidthHookProcPtr)(unsigned short styleRunLen,
  103. ;     unsigned short styleRunOffset, short slop, short direction, void *textBufferPtr, 
  104. ;     short *lineStart, TEPtr pTE, TEHandle hTE);
  105. ;
  106. ;        In:
  107. ;            =>     styleRunLen                D0.W
  108. ;            =>    styleRunOffset            D1.W
  109. ;            =>    slop                    D2.W (low)
  110. ;            =>    direction                D2.W (high)
  111. ;            =>    textBufferPtr            A0.L
  112. ;            =>    lineStart                A2.L
  113. ;            =>    pTE                        A3.L
  114. ;            =>    hTE                        A4.L
  115. ;        Out:
  116. ;            <=    unsigned short            D1.W
  117. ;
  118. ;    typedef pascal void (*DrawHookProcPtr)(unsigned short textOffset, unsigned short drawLen,
  119. ;     void *textBufferPtr, TEPtr pTE, TEHandle hTE);
  120. ;
  121. ;        In:
  122. ;            =>     textOffset                D0.W
  123. ;            =>    drawLen                    D1.W
  124. ;            =>    textBufferPtr            A0.L
  125. ;            =>    pTE                        A3.L
  126. ;            =>    hTE                        A4.L
  127. ;        Out:
  128. ;            none
  129. ;
  130. ;    typedef pascal Boolean (*HitTestHookProcPtr)(unsigned short styleRunLen,
  131. ;     unsigned short styleRunOffset, unsigned short slop, void *textBufferPtr,
  132. ;     TEPtr pTE, TEHandle hTE, unsigned short *pixelWidth, unsigned short *charOffset, 
  133. ;     Boolean *pixelInChar);
  134. ;
  135. ;        In:
  136. ;            =>     styleRunLen                D0.W
  137. ;            =>    styleRunOffset            D1.W
  138. ;            =>    slop                    D2.W
  139. ;            =>    textBufferPtr            A0.L
  140. ;            =>    pTE                        A3.L
  141. ;            =>    hTE                        A4.L
  142. ;        Out:
  143. ;            <=    pixelWidth                D0.W (low)
  144. ;            <=    Boolean                    D0.W (high)
  145. ;            <=    charOffset                D1.W
  146. ;            <=    pixelInChar                D2.W
  147. ;
  148. ;    typedef pascal void (*TEFindWordProcPtr)(unsigned short currentPos, short caller, 
  149. ;     TEPtr pTE, TEHandle hTE, unsigned short *wordStart, unsigned short *wordEnd);
  150. ;
  151. ;        In:
  152. ;            =>     currentPos                D0.W
  153. ;            =>    caller                    D2.W
  154. ;            =>    pTE                        A3.L
  155. ;            =>    hTE                        A4.L
  156. ;        Out:
  157. ;            <=    wordStart                D0.W
  158. ;            <=    wordEnd                    D1.W
  159. ;
  160. ;    typedef pascal void (*TERecalcProcPtr)(TEPtr pTE, unsigned short changeLength,
  161. ;       unsigned short *lineStart, unsigned short *firstChar, unsigned short *lastChar);
  162. ;
  163. ;        In:
  164. ;            =>     pTE                        A3.L
  165. ;            =>    changeLength            D7.W
  166. ;        Out:
  167. ;            <=    lineStart                D2.W
  168. ;            <=    firstChar                D3.W
  169. ;            <=    lastChar                D4.W
  170. ;
  171. ;    typedef pascal void (*TEDoTextProcPtr)(TEPtr pTE, unsigned short firstChar, unsigned short lastChar,
  172. ;                         short selector, GrafPtr *currentGrafPort, short *charPosition);
  173. ;
  174. ;        In:
  175. ;            =>     pTE                        A3.L
  176. ;            =>    firstChar                D3.W
  177. ;            =>    lastChar                D4.W
  178. ;            =>    selector                D7.W
  179. ;        Out:
  180. ;            <=    currentGrafPort            A0.L
  181. ;            <=    charPosition            D0.W
  182. ;            
  183. ;
  184.  
  185. TERec                    RECORD 0
  186. destRect                 ds        Rect            ; offset: $0 (0)
  187. viewRect                 ds        Rect            ; offset: $8 (8)
  188. selRect                     ds        Rect            ; offset: $10 (16)
  189. lineHeight                 ds.w    1                ; offset: $18 (24)
  190. fontAscent                 ds.w    1                ; offset: $1A (26)
  191. selPoint                 ds        Point            ; offset: $1C (28)
  192. selStart                 ds.w    1                ; offset: $20 (32)
  193. selEnd                     ds.w    1                ; offset: $22 (34)
  194. active                     ds.w    1                ; offset: $24 (36)
  195. wordBreak                 ds.l    1                ; offset: $26 (38)
  196. clickLoop                 ds.l    1                ; offset: $2A (42)
  197. clickTime                 ds.l    1                ; offset: $2E (46)
  198. clickLoc                 ds.w    1                ; offset: $32 (50)
  199. caretTime                 ds.l    1                ; offset: $34 (52)
  200. caretState                 ds.w    1                ; offset: $38 (56)
  201. just                     ds.w    1                ; offset: $3A (58)
  202. teLength                 ds.w    1                ; offset: $3C (60)
  203. hText                     ds.l    1                ; offset: $3E (62)
  204. hDispatchRec             ds.l    1                ; offset: $42 (66)        ;  added to replace recalBack & recalLines.  it's a handle anyway 
  205. clikStuff                 ds.w    1                ; offset: $46 (70)
  206. crOnly                     ds.w    1                ; offset: $48 (72)
  207. txFont                     ds.w    1                ; offset: $4A (74)
  208. txFace                     ds.w    1                ; offset: $4C (76)        ; txFace is unpacked byte
  209. txMode                     ds.w    1                ; offset: $4E (78)
  210. txSize                     ds.w    1                ; offset: $50 (80)
  211. inPort                     ds.l    1                ; offset: $52 (82)
  212. highHook                 ds.l    1                ; offset: $56 (86)
  213. caretHook                 ds.l    1                ; offset: $5A (90)
  214. nLines                     ds.w    1                ; offset: $5E (94)
  215. lineStarts                 ds.w    16001            ; offset: $60 (96)
  216. sizeof                     EQU *                    ; size:   $7D62 (32098)
  217.                         ENDR
  218.  
  219.                                                             ; Justification (word alignment) styles 
  220. teJustLeft                        EQU        0
  221. teJustCenter                    EQU        1
  222. teJustRight                        EQU        -1
  223. teForceLeft                        EQU        -2                    ; new names for the Justification (word alignment) styles 
  224. teFlushDefault                    EQU        0                    ;flush according to the line direction 
  225. teCenter                        EQU        1                    ;center justify (word alignment) 
  226. teFlushRight                    EQU        -1                    ;flush right for all scripts 
  227. teFlushLeft                        EQU        -2                    ;flush left for all scripts 
  228.  
  229.                                                             ; Set/Replace style modes 
  230. fontBit                            EQU        0                    ;set font
  231. faceBit                            EQU        1                    ;set face
  232. sizeBit                            EQU        2                    ;set size
  233. clrBit                            EQU        3                    ;set color
  234. addSizeBit                        EQU        4                    ;add size mode
  235. toggleBit                        EQU        5                    ;set faces in toggle mode
  236.  
  237.                                                             ; TESetStyle/TEContinuousStyle modes 
  238. doFont                            EQU        1                    ; set font (family) number
  239. doFace                            EQU        2                    ;set character style
  240. doSize                            EQU        4                    ;set type size
  241. doColor                            EQU        8                    ;set color
  242. doAll                            EQU        15                    ;set all attributes
  243. addSize                            EQU        16                    ;adjust type size
  244. doToggle                        EQU        32                    ;toggle mode for TESetStyle
  245.  
  246.                                                             ; offsets into TEDispatchRec 
  247. EOLHook                            EQU        0                    ;[UniversalProcPtr] TEEOLHook
  248. DRAWHook                        EQU        4                    ;[UniversalProcPtr] TEWidthHook
  249. WIDTHHook                        EQU        8                    ;[UniversalProcPtr] TEDrawHook
  250. HITTESTHook                        EQU        12                    ;[UniversalProcPtr] TEHitTestHook
  251. nWIDTHHook                        EQU        24                    ;[UniversalProcPtr] nTEWidthHook
  252. TextWidthHook                    EQU        28                    ;[UniversalProcPtr] TETextWidthHook
  253.  
  254.                                                             ; selectors for TECustomHook 
  255. intEOLHook                        EQU        0                    ;TEIntHook value
  256. intDrawHook                        EQU        1                    ;TEIntHook value
  257. intWidthHook                    EQU        2                    ;TEIntHook value
  258. intHitTestHook                    EQU        3                    ;TEIntHook value
  259. intNWidthHook                    EQU        6                    ;TEIntHook value for new version of WidthHook
  260. intTextWidthHook                EQU        7                    ;TEIntHook value for new TextWidthHook
  261. intInlineInputTSMTEPreUpdateHook EQU    8                    ;TEIntHook value for TSMTEPreUpdateProcPtr callback
  262. intInlineInputTSMTEPostUpdateHook EQU    9                    ;TEIntHook value for TSMTEPostUpdateProcPtr callback
  263.  
  264.                                                             ; feature or bit definitions for TEFeatureFlag 
  265. teFAutoScroll                    EQU        0                    ;00000001b
  266. teFTextBuffering                EQU        1                    ;00000010b
  267. teFOutlineHilite                EQU        2                    ;00000100b
  268. teFInlineInput                    EQU        3                    ;00001000b 
  269. teFUseWhiteBackground            EQU        4                    ;00010000b 
  270. teFUseInlineInput                EQU        5                    ;00100000b 
  271. teFInlineInputAutoScroll        EQU        6                    ;01000000b 
  272.  
  273.                                                             ; action for the new "bit (un)set" interface, TEFeatureFlag 
  274. teBitClear                        EQU        0
  275. teBitSet                        EQU        1                    ;set the selector bit
  276. teBitTest                        EQU        -1                    ;no change; just return the current setting
  277.  
  278.                                                             ;constants for identifying the routine that called FindWord 
  279. teWordSelect                    EQU        4                    ;clickExpand to select word
  280. teWordDrag                        EQU        8                    ;clickExpand to drag new word
  281. teFromFind                        EQU        12                    ;FindLine called it ($0C)
  282. teFromRecal                        EQU        16                    ;RecalLines called it ($10)      obsolete 
  283.  
  284.                                                             ;constants for identifying TEDoText selectors 
  285. teFind                            EQU        0                    ;TEDoText called for searching
  286. teHighlight                        EQU        1                    ;TEDoText called for highlighting
  287. teDraw                            EQU        -1                    ;TEDoText called for drawing text
  288. teCaret                            EQU        -2                    ;TEDoText called for drawing the caret
  289.  
  290.  
  291. Chars                    RECORD 0
  292. elements                 ds.b    32001
  293.                          ORG 32002
  294. sizeof                     EQU *                    ; size:   $7D02 (32002)
  295.                         ENDR
  296.  
  297.  
  298. ; typedef CharsPtr *                    CharsHandle
  299.  
  300. StyleRun                RECORD 0
  301. startChar                 ds.w    1                ; offset: $0 (0)        ; starting character position
  302. styleIndex                 ds.w    1                ; offset: $2 (2)        ; index in style table
  303. sizeof                     EQU *                    ; size:   $4 (4)
  304.                         ENDR
  305. STElement                RECORD 0
  306. stCount                     ds.w    1                ; offset: $0 (0)        ; number of runs in this style
  307. stHeight                 ds.w    1                ; offset: $2 (2)        ; line height
  308. stAscent                 ds.w    1                ; offset: $4 (4)        ; font ascent
  309. stFont                     ds.w    1                ; offset: $6 (6)        ; font (family) number
  310. stFace                     ds.w    1                ; offset: $8 (8)        ; character Style
  311. stSize                     ds.w    1                ; offset: $A (10)        ; size in points
  312. stColor                     ds        RGBColor        ; offset: $C (12)        ; absolute (RGB) color
  313. sizeof                     EQU *                    ; size:   $12 (18)
  314.                         ENDR
  315. TEStyleTable            RECORD 0
  316. elements                 ds.b    1777 * STElement.sizeof
  317. sizeof                     EQU *                    ; size:   $7CF2 (31986)
  318.                         ENDR
  319.  
  320.  
  321. ; typedef STPtr *                        STHandle
  322.  
  323. LHElement                RECORD 0
  324. lhHeight                 ds.w    1                ; offset: $0 (0)        ; maximum height in line
  325. lhAscent                 ds.w    1                ; offset: $2 (2)        ; maximum ascent in line
  326. sizeof                     EQU *                    ; size:   $4 (4)
  327.                         ENDR
  328. LHTable                    RECORD 0
  329. elements                 ds.b    8001 * LHElement.sizeof
  330. sizeof                     EQU *                    ; size:   $7D04 (32004)
  331.                         ENDR
  332.  
  333.  
  334. ; typedef LHPtr *                        LHHandle
  335.  
  336. ScrpSTElement            RECORD 0
  337. scrpStartChar             ds.l    1                ; offset: $0 (0)        ; starting character position
  338. scrpHeight                 ds.w    1                ; offset: $4 (4)
  339. scrpAscent                 ds.w    1                ; offset: $6 (6)
  340. scrpFont                 ds.w    1                ; offset: $8 (8)
  341. scrpFace                 ds.w    1                ; offset: $A (10)        ; unpacked byte
  342. scrpSize                 ds.w    1                ; offset: $C (12)
  343. scrpColor                 ds        RGBColor        ; offset: $E (14)
  344. sizeof                     EQU *                    ; size:   $14 (20)
  345.                         ENDR
  346. ;  ARRAY [0..1600] OF ScrpSTElement 
  347. ScrpSTTable                RECORD 0
  348. elements                 ds.b    1601 * ScrpSTElement.sizeof
  349. sizeof                     EQU *                    ; size:   $7D14 (32020)
  350.                         ENDR
  351.  
  352.  
  353. StScrpRec                RECORD 0
  354. scrpNStyles                 ds.w    1                ; offset: $0 (0)        ; number of styles in scrap
  355. scrpStyleTab             ds        ScrpSTTable        ; offset: $2 (2)        ; table of styles for scrap
  356. sizeof                     EQU *                    ; size:   $7D16 (32022)
  357.                         ENDR
  358. ; typedef struct StScrpRec *            StScrpPtr
  359.  
  360. ; typedef StScrpPtr *                    StScrpHandle
  361.  
  362. NullStRec                RECORD 0
  363. teReserved                 ds.l    1                ; offset: $0 (0)        ; reserved for future expansion
  364. nullScrap                 ds.l    1                ; offset: $4 (4)        ; handle to scrap style table
  365. sizeof                     EQU *                    ; size:   $8 (8)
  366.                         ENDR
  367. ; typedef struct NullStRec *            NullStPtr
  368.  
  369. ; typedef NullStPtr *                    NullStHandle
  370.  
  371. TEStyleRec                RECORD 0
  372. nRuns                     ds.w    1                ; offset: $0 (0)        ; number of style runs
  373. nStyles                     ds.w    1                ; offset: $2 (2)        ; size of style table
  374. styleTab                 ds.l    1                ; offset: $4 (4)        ; handle to style table
  375. lhTab                     ds.l    1                ; offset: $8 (8)        ; handle to line-height table
  376. teRefCon                 ds.l    1                ; offset: $C (12)        ; reserved for application use
  377. nullStyle                 ds.l    1                ; offset: $10 (16)        ; Handle to style set at null selection
  378. runs                     ds.b    8001 * StyleRun.sizeof ; offset: $14 (20) ; ARRAY [0..8000] OF StyleRun
  379. sizeof                     EQU *                    ; size:   $7D18 (32024)
  380.                         ENDR
  381. ; typedef struct TEStyleRec *            TEStylePtr
  382.  
  383. ; typedef TEStylePtr *                    TEStyleHandle
  384.  
  385. TextStyle                RECORD 0
  386. tsFont                     ds.w    1                ; offset: $0 (0)        ; font (family) number
  387. tsFace                     ds.w    1                ; offset: $2 (2)        ; character Style
  388. tsSize                     ds.w    1                ; offset: $4 (4)        ; size in point
  389. tsColor                     ds        RGBColor        ; offset: $6 (6)        ; absolute (RGB) color
  390. sizeof                     EQU *                    ; size:   $C (12)
  391.                         ENDR
  392. ; typedef struct TextStyle *            TextStylePtr
  393.  
  394. ; typedef TextStylePtr *                TextStyleHandle
  395.  
  396. ; typedef short                         TEIntHook
  397.  
  398.  
  399.                                                             ; feature bit 4 for TEFeatureFlag no longer in use 
  400. teFUseTextServices                EQU        4                    ;00010000b 
  401.  
  402. ;
  403. ; pascal Handle TEScrapHandle(void)
  404. ;
  405.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  406.         Macro
  407.         _TEScrapHandle        &dest=(sp)
  408.             move.l            $0AB4,&dest
  409.         EndM
  410.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  411.         IMPORT_CFM_FUNCTION TEScrapHandle
  412.     ENDIF
  413.  
  414. ;
  415. ; pascal void TEInit(void )
  416. ;
  417.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  418.         _TEInit:    OPWORD    $A9CC
  419.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  420.         IMPORT_CFM_FUNCTION TEInit
  421.     ENDIF
  422.  
  423. ;
  424. ; pascal TEHandle TENew(const Rect *destRect, const Rect *viewRect)
  425. ;
  426.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  427.         _TENew:    OPWORD    $A9D2
  428.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  429.         IMPORT_CFM_FUNCTION TENew
  430.     ENDIF
  431.  
  432. ;
  433. ; pascal void TEDispose(TEHandle hTE)
  434. ;
  435.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  436.         _TEDispose:    OPWORD    $A9CD
  437.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  438.         IMPORT_CFM_FUNCTION TEDispose
  439.     ENDIF
  440.  
  441. ;
  442. ; pascal void TESetText(const void *text, long length, TEHandle hTE)
  443. ;
  444.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  445.         _TESetText:    OPWORD    $A9CF
  446.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  447.         IMPORT_CFM_FUNCTION TESetText
  448.     ENDIF
  449.  
  450. ;
  451. ; pascal CharsHandle TEGetText(TEHandle hTE)
  452. ;
  453.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  454.         _TEGetText:    OPWORD    $A9CB
  455.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  456.         IMPORT_CFM_FUNCTION TEGetText
  457.     ENDIF
  458.  
  459. ;
  460. ; pascal void TEIdle(TEHandle hTE)
  461. ;
  462.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  463.         _TEIdle:    OPWORD    $A9DA
  464.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  465.         IMPORT_CFM_FUNCTION TEIdle
  466.     ENDIF
  467.  
  468. ;
  469. ; pascal void TESetSelect(long selStart, long selEnd, TEHandle hTE)
  470. ;
  471.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  472.         _TESetSelect:    OPWORD    $A9D1
  473.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  474.         IMPORT_CFM_FUNCTION TESetSelect
  475.     ENDIF
  476.  
  477. ;
  478. ; pascal void TEActivate(TEHandle hTE)
  479. ;
  480.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  481.         _TEActivate:    OPWORD    $A9D8
  482.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  483.         IMPORT_CFM_FUNCTION TEActivate
  484.     ENDIF
  485.  
  486. ;
  487. ; pascal void TEDeactivate(TEHandle hTE)
  488. ;
  489.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  490.         _TEDeactivate:    OPWORD    $A9D9
  491.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  492.         IMPORT_CFM_FUNCTION TEDeactivate
  493.     ENDIF
  494.  
  495. ;
  496. ; pascal void TEKey(CharParameter key, TEHandle hTE)
  497. ;
  498.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  499.         _TEKey:    OPWORD    $A9DC
  500.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  501.         IMPORT_CFM_FUNCTION TEKey
  502.     ENDIF
  503.  
  504. ;
  505. ; pascal void TECut(TEHandle hTE)
  506. ;
  507.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  508.         _TECut:    OPWORD    $A9D6
  509.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  510.         IMPORT_CFM_FUNCTION TECut
  511.     ENDIF
  512.  
  513. ;
  514. ; pascal void TECopy(TEHandle hTE)
  515. ;
  516.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  517.         _TECopy:    OPWORD    $A9D5
  518.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  519.         IMPORT_CFM_FUNCTION TECopy
  520.     ENDIF
  521.  
  522. ;
  523. ; pascal void TEPaste(TEHandle hTE)
  524. ;
  525.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  526.         _TEPaste:    OPWORD    $A9DB
  527.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  528.         IMPORT_CFM_FUNCTION TEPaste
  529.     ENDIF
  530.  
  531. ;
  532. ; pascal void TEDelete(TEHandle hTE)
  533. ;
  534.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  535.         _TEDelete:    OPWORD    $A9D7
  536.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  537.         IMPORT_CFM_FUNCTION TEDelete
  538.     ENDIF
  539.  
  540. ;
  541. ; pascal void TEInsert(const void *text, long length, TEHandle hTE)
  542. ;
  543.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  544.         _TEInsert:    OPWORD    $A9DE
  545.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  546.         IMPORT_CFM_FUNCTION TEInsert
  547.     ENDIF
  548.  
  549. ;
  550. ; pascal void TESetAlignment(short just, TEHandle hTE)
  551. ;
  552.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  553.         _TESetAlignment:    OPWORD    $A9DF
  554.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  555.         IMPORT_CFM_FUNCTION TESetAlignment
  556.     ENDIF
  557.  
  558. ;
  559. ; pascal void TEUpdate(const Rect *rUpdate, TEHandle hTE)
  560. ;
  561.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  562.         _TEUpdate:    OPWORD    $A9D3
  563.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  564.         IMPORT_CFM_FUNCTION TEUpdate
  565.     ENDIF
  566.  
  567. ;
  568. ; pascal void TETextBox(const void *text, long length, const Rect *box, short just)
  569. ;
  570.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  571.         _TETextBox:    OPWORD    $A9CE
  572.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  573.         IMPORT_CFM_FUNCTION TETextBox
  574.     ENDIF
  575.  
  576. ;
  577. ; pascal void TEScroll(short dh, short dv, TEHandle hTE)
  578. ;
  579.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  580.         _TEScroll:    OPWORD    $A9DD
  581.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  582.         IMPORT_CFM_FUNCTION TEScroll
  583.     ENDIF
  584.  
  585. ;
  586. ; pascal void TESelView(TEHandle hTE)
  587. ;
  588.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  589.         _TESelView:    OPWORD    $A811
  590.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  591.         IMPORT_CFM_FUNCTION TESelView
  592.     ENDIF
  593.  
  594. ;
  595. ; pascal void TEPinScroll(short dh, short dv, TEHandle hTE)
  596. ;
  597.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  598.         _TEPinScroll:    OPWORD    $A812
  599.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  600.         IMPORT_CFM_FUNCTION TEPinScroll
  601.     ENDIF
  602.  
  603. ;
  604. ; pascal void TEAutoView(Boolean fAuto, TEHandle hTE)
  605. ;
  606.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  607.         _TEAutoView:    OPWORD    $A813
  608.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  609.         IMPORT_CFM_FUNCTION TEAutoView
  610.     ENDIF
  611.  
  612. ;
  613. ; pascal void TECalText(TEHandle hTE)
  614. ;
  615.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  616.         _TECalText:    OPWORD    $A9D0
  617.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  618.         IMPORT_CFM_FUNCTION TECalText
  619.     ENDIF
  620.  
  621. ;
  622. ; pascal short TEGetOffset(Point pt, TEHandle hTE)
  623. ;
  624.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  625.         _TEGetOffset:    OPWORD    $A83C
  626.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  627.         IMPORT_CFM_FUNCTION TEGetOffset
  628.     ENDIF
  629.  
  630. ;
  631. ; pascal Point TEGetPoint(short offset, TEHandle hTE)
  632. ;
  633.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  634.         Macro
  635.         _TEGetPoint
  636.             move.w              #$0008,-(sp)
  637.             dc.w                $A83D
  638.         EndM
  639.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  640.         IMPORT_CFM_FUNCTION TEGetPoint
  641.     ENDIF
  642.  
  643. ;
  644. ; pascal void TEClick(Point pt, Boolean fExtend, TEHandle h)
  645. ;
  646.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  647.         _TEClick:    OPWORD    $A9D4
  648.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  649.         IMPORT_CFM_FUNCTION TEClick
  650.     ENDIF
  651.  
  652. ;
  653. ; pascal TEHandle TEStyleNew(const Rect *destRect, const Rect *viewRect)
  654. ;
  655.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  656.         _TEStyleNew:    OPWORD    $A83E
  657.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  658.         IMPORT_CFM_FUNCTION TEStyleNew
  659.     ENDIF
  660.  
  661. ;
  662. ; pascal void TESetStyleHandle(TEStyleHandle theHandle, TEHandle hTE)
  663. ;
  664.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  665.         Macro
  666.         _TESetStyleHandle
  667.             move.w              #$0005,-(sp)
  668.             dc.w                $A83D
  669.         EndM
  670.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  671.         IMPORT_CFM_FUNCTION TESetStyleHandle
  672.     ENDIF
  673.  
  674. ;
  675. ; pascal TEStyleHandle TEGetStyleHandle(TEHandle hTE)
  676. ;
  677.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  678.         Macro
  679.         _TEGetStyleHandle
  680.             move.w              #$0004,-(sp)
  681.             dc.w                $A83D
  682.         EndM
  683.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  684.         IMPORT_CFM_FUNCTION TEGetStyleHandle
  685.     ENDIF
  686.  
  687. ;
  688. ; pascal void TEGetStyle(short offset, TextStyle *theStyle, short *lineHeight, short *fontAscent, TEHandle hTE)
  689. ;
  690.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  691.         Macro
  692.         _TEGetStyle
  693.             move.w              #$0003,-(sp)
  694.             dc.w                $A83D
  695.         EndM
  696.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  697.         IMPORT_CFM_FUNCTION TEGetStyle
  698.     ENDIF
  699.  
  700. ;
  701. ; pascal void TEStylePaste(TEHandle hTE)
  702. ;
  703.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  704.         Macro
  705.         _TEStylePaste
  706.             move.w              #$0000,-(sp)
  707.             dc.w                $A83D
  708.         EndM
  709.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  710.         IMPORT_CFM_FUNCTION TEStylePaste
  711.     ENDIF
  712.  
  713. ;
  714. ; pascal void TESetStyle(short mode, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  715. ;
  716.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  717.         Macro
  718.         _TESetStyle
  719.             move.w              #$0001,-(sp)
  720.             dc.w                $A83D
  721.         EndM
  722.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  723.         IMPORT_CFM_FUNCTION TESetStyle
  724.     ENDIF
  725.  
  726. ;
  727. ; pascal void TEReplaceStyle(short mode, const TextStyle *oldStyle, const TextStyle *newStyle, Boolean fRedraw, TEHandle hTE)
  728. ;
  729.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  730.         Macro
  731.         _TEReplaceStyle
  732.             move.w              #$0002,-(sp)
  733.             dc.w                $A83D
  734.         EndM
  735.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  736.         IMPORT_CFM_FUNCTION TEReplaceStyle
  737.     ENDIF
  738.  
  739. ;
  740. ; pascal StScrpHandle TEGetStyleScrapHandle(TEHandle hTE)
  741. ;
  742.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  743.         Macro
  744.         _TEGetStyleScrapHandle
  745.             move.w              #$0006,-(sp)
  746.             dc.w                $A83D
  747.         EndM
  748.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  749.         IMPORT_CFM_FUNCTION TEGetStyleScrapHandle
  750.     ENDIF
  751.  
  752. ;
  753. ; pascal void TEStyleInsert(const void *text, long length, StScrpHandle hST, TEHandle hTE)
  754. ;
  755.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  756.         Macro
  757.         _TEStyleInsert
  758.             move.w              #$0007,-(sp)
  759.             dc.w                $A83D
  760.         EndM
  761.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  762.         IMPORT_CFM_FUNCTION TEStyleInsert
  763.     ENDIF
  764.  
  765. ;
  766. ; pascal long TEGetHeight(long endLine, long startLine, TEHandle hTE)
  767. ;
  768.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  769.         Macro
  770.         _TEGetHeight
  771.             move.w              #$0009,-(sp)
  772.             dc.w                $A83D
  773.         EndM
  774.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  775.         IMPORT_CFM_FUNCTION TEGetHeight
  776.     ENDIF
  777.  
  778. ;
  779. ; pascal Boolean TEContinuousStyle(short *mode, TextStyle *aStyle, TEHandle hTE)
  780. ;
  781.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  782.         Macro
  783.         _TEContinuousStyle
  784.             move.w              #$000A,-(sp)
  785.             dc.w                $A83D
  786.         EndM
  787.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  788.         IMPORT_CFM_FUNCTION TEContinuousStyle
  789.     ENDIF
  790.  
  791. ;
  792. ; pascal void TEUseStyleScrap(long rangeStart, long rangeEnd, StScrpHandle newStyles, Boolean fRedraw, TEHandle hTE)
  793. ;
  794.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  795.         Macro
  796.         _TEUseStyleScrap
  797.             move.w              #$000B,-(sp)
  798.             dc.w                $A83D
  799.         EndM
  800.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  801.         IMPORT_CFM_FUNCTION TEUseStyleScrap
  802.     ENDIF
  803.  
  804. ;
  805. ; pascal void TECustomHook(TEIntHook which, UniversalProcPtr *addr, TEHandle hTE)
  806. ;
  807.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  808.         Macro
  809.         _TECustomHook
  810.             move.w              #$000C,-(sp)
  811.             dc.w                $A83D
  812.         EndM
  813.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  814.         IMPORT_CFM_FUNCTION TECustomHook
  815.     ENDIF
  816.  
  817. ;
  818. ; pascal long TENumStyles(long rangeStart, long rangeEnd, TEHandle hTE)
  819. ;
  820.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  821.         Macro
  822.         _TENumStyles
  823.             move.w              #$000D,-(sp)
  824.             dc.w                $A83D
  825.         EndM
  826.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  827.         IMPORT_CFM_FUNCTION TENumStyles
  828.     ENDIF
  829.  
  830. ;
  831. ; pascal short TEFeatureFlag(short feature, short action, TEHandle hTE)
  832. ;
  833.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  834.         Macro
  835.         _TEFeatureFlag
  836.             move.w              #$000E,-(sp)
  837.             dc.w                $A83D
  838.         EndM
  839.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  840.         IMPORT_CFM_FUNCTION TEFeatureFlag
  841.     ENDIF
  842.  
  843. ;
  844. ; pascal OSErr TEGetHiliteRgn(RgnHandle region, TEHandle hTE)
  845. ;
  846.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  847.         Macro
  848.         _TEGetHiliteRgn
  849.             move.w              #$000F,-(sp)
  850.             dc.w                $A83D
  851.         EndM
  852.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  853.         IMPORT_CFM_FUNCTION TEGetHiliteRgn
  854.     ENDIF
  855.  
  856. ;
  857. ; pascal void TESetScrapLength(long length)
  858. ;
  859.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  860.         IMPORT_CFM_FUNCTION TESetScrapLength
  861.     ENDIF
  862.  
  863. ;
  864. ; pascal OSErr TEFromScrap(void )
  865. ;
  866.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  867.         IMPORT_CFM_FUNCTION TEFromScrap
  868.     ENDIF
  869.  
  870. ;
  871. ; pascal OSErr TEToScrap(void )
  872. ;
  873.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  874.         IMPORT_CFM_FUNCTION TEToScrap
  875.     ENDIF
  876.  
  877. ;
  878. ; pascal void TESetClickLoop(TEClickLoopUPP clikProc, TEHandle hTE)
  879. ;
  880.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  881.         IMPORT_CFM_FUNCTION TESetClickLoop
  882.     ENDIF
  883.  
  884. ;
  885. ; pascal void TESetWordBreak(WordBreakUPP wBrkProc, TEHandle hTE)
  886. ;
  887.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  888.         IMPORT_CFM_FUNCTION TESetWordBreak
  889.     ENDIF
  890.  
  891.  
  892.     IF OLDROUTINENAMES THEN
  893.     ENDIF    ; OLDROUTINENAMES
  894.     ENDIF ; __TEXTEDIT__ 
  895.  
  896.